$(function () {
	$("td > button[data-id]").click(function () {
		var id = $(this).attr("data-id");
		var name = $(this).attr("data-name");
		$("#msg").html(name);
		$("button[data-type='submit']").attr("data-id", id);
	});
	
	$("button[data-type='submit']").click(function () {
		location.href = "teacher/delete?id=" + $(this).attr("data-id");
	});
	
	$("table a").on("click", function() {
		var url = $(this).attr("href");
		var title = $(this).attr("data-title");
		window.parent.tabUtil.add(url, title, true);
		return false;
	});
});